<?php

namespace CNAM\ActimanBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use CNAM\ActimanBundle\Entity\acProcedure;

class DefaultController extends Controller
{
    public function indexAction()
    {
        $titre="Actiman";
        return $this->render('CNAMActimanBundle:Default:index.html.twig',array('titre'=>$titre));
    }
        public function addAction() {
        
        $procedure = new acProcedure();
        
        $form = $this->createFormBuilder($procedure)
                ->add('nameProcedure','text')
                ->add('status','text')
                ->add('date','date')
                ->add('save','submit')
                ->getForm();
   
        $formte=$form->createView();
        
        $titre="Procedure";
        return $this->render('CNAMActimanBundle:Default:new.html.twig',array('form'=>$formte,'titre'=>$titre,
        ));
    }
    
    
    
    public function testAction($name)
    {
        return $this->render('CNAMActimanBundle:Default:test.html.twig',array('name'=>$name));
    }
}
